image_name=mate-uaa
image_version=2.3.8-SNAPSHOT
image_port=20001
imagesid=`docker images|grep -i $name|awk '{print $3}'`

if ! -n "$imagesid";then
    echo $imagesid "is null"
	docker stop $name 
	docker rmi $imagesid -f 
	echo $imagesid "has del"
else
    docker rmi $imagesid -f
fi

echo "begin run"

docker run -it -d -p $image_port:$image_port -e "SPRING_PROFILES_ACTIVE=prod" --name $image_name registry.cn-hangzhou.aliyuncs.com/matecloud/mate-gateway:$image_version